<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function runAsync() {
            var p = new Promise(function (resolve, reject) {
                //做一些异步操作
                setTimeout(function () {
                    console.log('执行完成');
                    resolve('随便什么数据');
                }, 2000);
            });
            return p;
        }

        runAsync().then(function (data) {

            console.log('=====' + data)
        })
    </script>
</head>

<body>


<div class="warp">
    <div class="center">
        <div class="div1">div1==div1==div1</div>
        <div class="div2">div2==div2==div2</div>
    </div>
</div>
</body>
</html>